package com.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.SysTask;

import java.util.List;

public interface SysTaskService extends IService<SysTask> {

    public static final int FAILURES_COUNT = 5;

    public static final int SLEEP_TIME = 20 * 1000;

    public void init();

    public void stop();

    public void initTreadPool();

    public void initQueue();

    public void startWorkThread();

    public void stopWorkThread();

    public void stopTreadPool();

    public void refreshQueue(Long syncTime);

    public void dispatcher(SysTask sysTask);

    public void dispatcherToErrorQueue(SysTask sysTask);

    public void updateAndDispatcherListToQueue(List<SysTask> sysTask);

    public List<SysTask> findTaskByOffline(String serverKey);

}
